/**
 * 删除上传的图片
 */
function deleteCover(value) {
    $("#" + value).remove();
}

/**
 * 会员
 */

define([
    'jquery',
    'baseUtils',
    'base',
    'msgTool',
    'css!global/plugins/wangEditor/wangEditor.min.css',
    'plugins/wangEditor/wangEditor.min',
    'css!global/plugins/fileInput/fileinput.min.css',
    'plugins/fileInput/fileinput.min',
    'plugins/bootstrap-table/bootstrap-table',
    "plugins/bootstrap-dialog/bootstrap-dialog",
    "css!global/plugins/bootstrap-dialog/bootstrap-dialog.css"
], function ($, baseUtils, base, msgTool, _, E, _, _, _, BootstrapDialog) {
    //默认加载基础库
    base();
    //执行
    return {
    	 info: function () {                   

             /**
              * 提交食品许可证申请
              */

             $("#submitLicense").on('click', function () {
            	 var reg_businessArea = /^(0|[1-9]\d*)$/;//验证数字
            	 var premises = $("#premises").val();
            	 var businessArea=$("#businessArea").val();
            	 if(premises==''){
                    	$("#premises-error").html("(经营场所不能为空)");
                    	return false;
                     }else{
                     $("#premises-error").html("");	
                     }
            	   if(businessArea==''){
                   	   $("#businessArea-error").html("(经营面积不能为空)");
                     	return false;
                       }else{
                    	   if (!reg_businessArea.test(businessArea)){
                        		  $("#businessArea-error").html("请输入数字");
               					return false;
               				}else{
               				  $("#businessArea-error").html("");	
               				}
                       }
              	 $("#saveLicenseForm").submit();
              });
           
         }

    }
});


